#ifndef CONFIGURATION_H_
#define CONFIGURATION_H_

#include <map>
#include <cstddef>
#include <string>
#include "Color.h"

class Configuration
{
public:
    static const size_t BLOCK_SIZE = 20;
    static const unsigned long MS_BETWEEN_GRAVITATION_SPEED_CHANGES = 40 * 1000;
    static const double GRAVITATION_SPEED_CHANGE_FACTOR = 1.2;

    enum Key
    {
        LOCAL_HOST,
        SERVER_IP,
        CLIENT_NAME
    };

    typedef std::map<Key, std::string> Configs;
    typedef std::pair<Key, std::string> Config;

    static void set(Key key, std::string value);
    static std::string get(Key key);
    static Color getFirstUnusedColor(Colors& usedColors);

    static void save();
    static void load();

private:
    Configuration();
    static Colors createColorList();
    static Configs createConfigurationMap();

    static Colors playerColors;
    static Configs configs;
};


#endif
